# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=audiocd-kio
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://www.kde.org/applications/multimedia/"
pkgdesc="Kioslave for accessing audio CDs"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	cdparanoia-dev
	extra-cmake-modules
	flac-dev
	kcmutils5-dev
	kconfig5-dev
	kdoctools5-dev
	ki18n5-dev
	kio5-dev
	libkcddb-dev
	libkcompactdisc-dev
	libvorbis-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/multimedia/audiocd-kio.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/audiocd-kio-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d93691df349747ae59b0d8a10e9be270901c3fe69cc7004c82e1d9389fa5700342e3d8af3ca252dc0f8e710c9c04101d5dd0a621eeda0d9ecfc2c887b7a1251d  audiocd-kio-23.08.4.tar.xz
"
